package com.woniu51.search.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author 杨光
 * @date 2022年04月12日 10:49
 */
@Document(indexName = "woniu51movie",type = "movie",shards = 3,replicas = 1)
public class MovieSearch {


    @Field(type= FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String searchText;


    @Id
    @Field(type=FieldType.Integer,index = false)
    private Integer movieId;
    @Field(type=FieldType.Keyword,index = false)
    private String movieName;
    @Field(type=FieldType.Keyword,index = false)
    private String movieEname;
    @Field(type=FieldType.Keyword,index = false)
    private String movieInfo;
    @Field(type=FieldType.Keyword,index = false)
    private String movieImg;
    @Field(type=FieldType.Keyword,index = false)
    private String movieTypeStr;


    @Override
    public String toString() {
        return "MovieSearch{" +
                "searchText='" + searchText + '\'' +
                ", movieId=" + movieId +
                ", movieName='" + movieName + '\'' +
                ", movieEname='" + movieEname + '\'' +
                ", movieInfo='" + movieInfo + '\'' +
                ", movieImg='" + movieImg + '\'' +
                ", movieTypeStr='" + movieTypeStr + '\'' +
                '}';
    }

    public String getSearchText() {
        return searchText;
    }

    public void setSearchText(String searchText) {
        this.searchText = searchText;
    }

    public Integer getMovieId() {
        return movieId;
    }

    public void setMovieId(Integer movieId) {
        this.movieId = movieId;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public String getMovieEname() {
        return movieEname;
    }

    public void setMovieEname(String movieEname) {
        this.movieEname = movieEname;
    }

    public String getMovieInfo() {
        return movieInfo;
    }

    public void setMovieInfo(String movieInfo) {
        this.movieInfo = movieInfo;
    }

    public String getMovieImg() {
        return movieImg;
    }

    public void setMovieImg(String movieImg) {
        this.movieImg = movieImg;
    }

    public String getMovieTypeStr() {
        return movieTypeStr;
    }

    public void setMovieTypeStr(String movieTypeStr) {
        this.movieTypeStr = movieTypeStr;
    }
}
